package uto.phone.flash.wind.app

import android.os.Bundle
import android.view.ViewGroup
import uto.phone.flash.wind.R
import uto.phone.flash.wind.base.IActivity
import uto.phone.flash.wind.base.IAdapter
import uto.phone.flash.wind.base.IHolder
import uto.phone.flash.wind.base.gone
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.layout_title_bar.*

class NextActivity: IActivity() {

    private val adapter by lazy { object: IAdapter(activity = this){
        override fun createHolder(parent: ViewGroup, viewType: Int): IHolder {
            return object: HomeUserHolder(parent,activity,this){
                override fun initLayout() {
                    super.initLayout()
                    tvTitle.gone()
                }
            }
        }

        override fun getItemCount(): Int {
            return 1
        }
    } }

    override fun layoutRes(): Int {
        return R.layout.activity_next_1
    }

    override fun initLayout(bundle: Bundle?) {
        rvContent.adapter = adapter
        tvTitle.text = intent.getStringExtra("title")
    }

    override fun initListener() {
        ivBack.setOnClickListener { finish() }
    }
}